home *** CD-ROM | disk | FTP | other *** search
- /* EqEdFront.rexx -- This script is for opening EqEd in FW.
- * If you have selected a graphics object in FW, this script will try to find out
- * if it is an equation and if so, load the native version into EqEd.
- *
- * Make sure to assign EQED: to the directory where you installed EqEd.
- *
- * Made by David Shaffer and some minor adjustments by Brian Petersen.
- */
-
- /* Check for FinalWriter */
- options results
- if ~show('p','FINALW.1') then
- do
- say 'I should be used only when FinalWriter is running'
- exit
- end
-
- /* Start EqEd if it isn't running */
- lf = '0a'x
- IF ~SHOW('p','EQED.1') THEN
- DO
- ADDRESS COMMAND "cd eqed:"||lf||"run EqEd"
- ADDRESS COMMAND wait 5
- END
-
- /* Check to see if a graphics object is selected in FW */
- address 'FINALW.1'
- currentobject
- co = result
- eqname = ''
- if co ~= 0 then
- do
- getobjecttitle co
- eqname = result
- end
-
- /* Now get EqEd's attention and load the equation if it exists */
- ADDRESS "EQED.1"
-
- EQEDTOFRONT
-
- if eqname ~= '' then
- do
- if exists(eqname) then
- do
- setname eqname
- load
- end
- end
- else
- 'new'
-
-